package data
{
	import flash.geom.Point;

	public class PlotFunction
	{
		public var plotFunction:Function;
		
		public function PlotFunction(nf:Function) {
			//this.plotFunction = function(x:Number):Number { return x*x; }
			this.plotFunction = nf;
		}
		
		public function f(x:Number):Number {
			return this.plotFunction(x);
		}
		
		public function shifted(x:Number, from:Point):Number {
			var shift:Number = from.y - f(from.x);
			return this.f(x) + shift;
		}
		
	}
}